# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Testing.V1.Model.AndroidTestLoop do
  @moduledoc """
  A test of an Android Application with a Test Loop. The intent \\ will be implicitly added, since Games is the only user of this api, for the time being.

  ## Attributes

  *   `appApk` (*type:* `GoogleApi.Testing.V1.Model.FileReference.t`, *default:* `nil`) - The APK for the application under test.
  *   `appBundle` (*type:* `GoogleApi.Testing.V1.Model.AppBundle.t`, *default:* `nil`) - A multi-apk app bundle for the application under test.
  *   `appPackageId` (*type:* `String.t`, *default:* `nil`) - The java package for the application under test. The default is determined by examining the application's manifest.
  *   `scenarioLabels` (*type:* `list(String.t)`, *default:* `nil`) - The list of scenario labels that should be run during the test. The scenario labels should map to labels defined in the application's manifest. For example, player_experience and com.google.test.loops.player_experience add all of the loops labeled in the manifest with the com.google.test.loops.player_experience name to the execution. Scenarios can also be specified in the scenarios field.
  *   `scenarios` (*type:* `list(integer())`, *default:* `nil`) - The list of scenarios that should be run during the test. The default is all test loops, derived from the application's manifest.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :appApk => GoogleApi.Testing.V1.Model.FileReference.t() | nil,
          :appBundle => GoogleApi.Testing.V1.Model.AppBundle.t() | nil,
          :appPackageId => String.t() | nil,
          :scenarioLabels => list(String.t()) | nil,
          :scenarios => list(integer()) | nil
        }

  field(:appApk, as: GoogleApi.Testing.V1.Model.FileReference)
  field(:appBundle, as: GoogleApi.Testing.V1.Model.AppBundle)
  field(:appPackageId)
  field(:scenarioLabels, type: :list)
  field(:scenarios, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Testing.V1.Model.AndroidTestLoop do
  def decode(value, options) do
    GoogleApi.Testing.V1.Model.AndroidTestLoop.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Testing.V1.Model.AndroidTestLoop do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
